<?php
require_once (APPLICATION_DIR."/application/model/Location.php");
require_once (APPLICATION_DIR."/application/model/Industry.php");
require_once (APPLICATION_DIR."/application/model/Alumni_member_intake.php");
class AlumniGeneral
{
	function updateIntake($p_arrInfo)
	{
		$objGeneral = new DataObjects_Alumni_member_intake();
		$objGeneral -> intake_name = $p_arrInfo['intake_name'];
		$objGeneral -> intake_order = $p_arrInfo['intake_order'];
		$objGeneral -> whereAdd("id=" . $p_arrInfo['intake_id']);
		
		return $objGeneral -> update(DB_DATAOBJECT_WHEREADD_ONLY);
	}
	
	function addIntake($p_arrInfo)
	{
		$objGeneral = new DataObjects_Alumni_member_intake();
		$objGeneral -> intake_name = $p_arrInfo['intake_name'];
		$objGeneral -> intake_order = $p_arrInfo['intake_order'];
		
		return $objGeneral -> insert();
	}
	function getListIntake()
	{
		$objGeneral = new DataObjects_Alumni_member_intake();
		$objGeneral -> selectAdd();
		$objGeneral -> selectAdd("*");
		$objGeneral -> orderBy("intake_order ASC");
	
		return $objGeneral -> fetchList();
	}
	function updateLocation($p_arrInfo)
	{
		$objCareer = new DataObjects_Location();
		$objCareer -> location_name = $p_arrInfo["location_name"];
		$objCareer -> whereAdd("id=" . $p_arrInfo["location_id"]);
		return $objCareer -> update(DB_DATAOBJECT_WHEREADD_ONLY);
	}
	function addLocation($p_strLocationName)
	{
		$objCareer = new DataObjects_Location();
		$objCareer -> location_name = $p_strLocationName;
		
		return $objCareer -> insert();
	}
	
	function getListLocation()
	{
		$objCareer = new DataObjects_Location();
		$objCareer -> selectAdd();
		$objCareer -> selectAdd("*");
	
		return $objCareer -> fetchList();
	}
	function updateIndustry($p_arrInfo)
	{
		$objCareer = new DataObjects_Industry();
		$objCareer -> industry_name = $p_arrInfo["industry_name"];
		$objCareer -> whereAdd("id=" . $p_arrInfo["industry_id"]);
		return $objCareer -> update(DB_DATAOBJECT_WHEREADD_ONLY);
	}
	
	function addIndustry($p_strIndustryName)
	{
		$objCareer = new DataObjects_Industry();
		$objCareer -> industry_name = $p_strIndustryName;
		
		return $objCareer -> insert();
	}
	function getListIndustry()
	{
		$objCareer = new DataObjects_Industry();
		$objCareer -> selectAdd();
		$objCareer -> selectAdd("*");
	
		return $objCareer -> fetchList();
	}
}
?>